package com.example.gamestore.service.imp;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.gamestore.Bean.Content;
import com.example.gamestore.mapper.ContentMapper;
import com.example.gamestore.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContentServiceImp implements ContentService {
    @Autowired
    private ContentMapper contentMapper;
    @Override
    public List<Content> selectbyGameid(Integer gameid) {
        LambdaQueryWrapper<Content> wrapper=new LambdaQueryWrapper<>();
        wrapper.eq(Content::getGameId,gameid);
        List<Content> contentList = contentMapper.selectList(wrapper);
        return contentList;
    }
}
